From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Tue Sep 2 03:13:03 2003 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Tue Sep 2 03:14:26 2003 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 18:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue Sep 2 08:21:15 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain@phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 18:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue Sep 2 08:56:30 2003 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Wed Sep 3 15:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed Sep 3 05:02:24 2003 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 12:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed Sep 3 10:46:31 2003 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 11:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu Sep 4 09:06:06 2003 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 20:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu Sep 4 19:23:31 2003 Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From vinu at ntcb.com Fri Sep 5 11:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri Sep 5 16:55:56 2003 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 12:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Fri Sep 5 16:58:43 2003 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 18:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri Sep 5 16:58:45 2003 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 19:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Sep 5 18:55:31 2003 Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root@servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root@servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root@servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 20:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Sep 5 19:26:16 2003 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 20:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Sep 5 19:32:08 2003 Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 20:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Sep 5 19:40:48 2003 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 18:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Sat Sep 6 15:57:31 2003 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu@ntcb.com] Sent: 05 September 2003 16:50 To: rxtx@linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 12:48:38 2003 From: son at openbx.net (Son To) Date: Sat Sep 6 16:48:41 2003 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu@ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 14:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon Sep 8 13:59:01 2003 Subject: [Rxtx] searchable archive link Message-ID: >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 09:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue Sep 9 07:55:41 2003 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Tue Sep 16 01:11:09 2003 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 13:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Sep 16 12:03:35 2003 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Sep 16 20:51:32 2003 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 22:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Sep 16 21:25:04 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Sep 16 21:40:33 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 23:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Sep 16 22:12:43 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue Sep 16 22:34:56 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 23:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Sep 16 22:41:39 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed Sep 17 14:43:04 2003 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Tue Sep 2 03:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Tue Sep 2 03:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 08:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain@phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 08:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Wed Sep 3 05:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 10:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 09:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 19:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From vinu at ntcb.com Fri Sep 5 16:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 10:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 16:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 18:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root@servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root@servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root@servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 19:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 19:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 19:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 17:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu@ntcb.com] Sent: 05 September 2003 16:50 To: rxtx@linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 16:48:38 2003 From: son at openbx.net (Son To) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu@ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 13:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] searchable archive link Message-ID: >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 07:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Tue Sep 16 01:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Fri Jun 3 17:45:50 2005 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 12:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 20:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 21:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 21:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 22:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 22:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 22:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:50 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 14:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:51 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Tue Sep 2 03:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Tue Sep 2 03:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 08:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain@phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 08:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Wed Sep 3 05:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 10:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 09:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 19:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj@www.linux.org.uk From vinu at ntcb.com Fri Sep 5 16:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 10:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 16:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 18:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root@servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root@servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root@servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root@servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 19:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root@nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 19:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 19:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 17:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu@ntcb.com] Sent: 05 September 2003 16:50 To: rxtx@linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 16:48:38 2003 From: son at openbx.net (Son To) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu@ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 13:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] searchable archive link Message-ID: >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 07:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj@linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx@linuxgrrls.org, jasmine@linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Tue Sep 16 01:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Fri Jun 3 18:08:11 2005 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 12:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:11 2005 Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 20:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:11 2005 Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 21:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 21:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 22:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10@yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 22:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10@yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 22:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10@yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 14:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:12 2005 Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10@yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx@linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to receive no more e-mails from rxtx discussions, my mailbox is full... Thanks in advance Sylvie Trent Jarvi a ?crit : > >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 > Newsgroups: > Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) > From: Trent Jarvi > To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org > Subject: rxtxx Searchable archives > Fcc: sent-mail > Message-ID: > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=US-ASCII > > http://marc.theaimsgroup.com/?l=rxtx > > I knew this was someplace but couldn't find the link when it came up. > Configuring mailman to show this on the mail-list page appears to be > nontrivial so just bookmark the URL for now. > > -- > taj > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From David.Morris at triumf.ca Mon Sep 15 18:10:24 2003 From: David.Morris at triumf.ca (David Morris) Date: Mon, 15 Sep 2003 17:10:24 -0700 Subject: [RxTx] Reading parallel port data Message-ID: <3F6654F0.1050301@triumf.ca> Hello I have a motor system running under Java that positions a multi axis stage in a beam of protons (someone has to do it!) The user needs a way to watch the position of the stage and push buttons to move an axis back and forth until it is aligned. (This would be when the protons are not bouncing around the room) I have a pendant with a selection of buttons which select the axis, speed and direction. I want to connect this to the parallel port so that I don't need some complicated I/O card. Eight bits gives 3 bits for motor selection, 3 bits for speed, and 2 bits for direction. I had previously done this under Win98 using direct port access, but want to use RxTx because I am also using it for serial communication with the motor controller. (Less clutter in the make file). I have explored RxTx, fiddled with ParallelImp.c,and confirmed the file handle to lp0 is opened. I always get a "Input/output error" when I try to read the port. The one thing I realize is that the control of the parallel port must be such that the output mode of the port is disabled, so you can read the state of the switches with a read. Perhaps I am missing something, but I haven't seen this sort of manipulation in the ParallelImp.c file. Would it be done by the device driver based on the port configuration (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right now, and that would require a re-boot. Does this method of access require the use of /dev/parport instead of /dev/lp? Help from any of you will be greatly appreciated! David Morris TRIUMF Canada's National Meson Research Facility From taj at linuxgrrls.org Tue Sep 16 05:03:33 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 12:03:33 +0100 (BST) Subject: [RxTx] Reading parallel port data In-Reply-To: <3F6654F0.1050301@triumf.ca> References: <3F6654F0.1050301@triumf.ca> Message-ID: On Mon, 15 Sep 2003, David Morris wrote: > Hello > I have a motor system running under Java that positions a multi axis > stage in a beam of protons (someone has to do it!) > > The user needs a way to watch the position of the stage and push > buttons to move an axis back and forth until it is aligned. (This would > be when the protons are not bouncing around the room) I have a pendant > with a selection of buttons which select the axis, speed and direction. > I want to connect this to the parallel port so that I don't need some > complicated I/O card. Eight bits gives 3 bits for motor selection, 3 > bits for speed, and 2 bits for direction. I had previously done this > under Win98 using direct port access, but want to use RxTx because I am > also using it for serial communication with the motor controller. (Less > clutter in the make file). > > I have explored RxTx, fiddled with ParallelImp.c,and confirmed the > file handle to lp0 is opened. I always get a "Input/output error" when I > try to read the port. > > The one thing I realize is that the control of the parallel port must > be such that the output mode of the port is disabled, so you can read > the state of the switches with a read. Perhaps I am missing something, > but I haven't seen this sort of manipulation in the ParallelImp.c file. > Would it be done by the device driver based on the port configuration > (EPP, ECP, PS/2?) Of course I can't remember what mode it is in right > now, and that would require a re-boot. > > Does this method of access require the use of /dev/parport instead of > /dev/lp? > Hi David When I put the Parallel port code in, the linux kernel drivers appeared to be in flux. linux 2.0 had lp[0-3] bound to ioaddresses. I've not looked at the parallel port much since then so take this with a grain of salt. The parport/lp devices should be mapping to the same thing. In rxtx you can edit RXTXCommDriver and add parport to the list of ports supported. { String[] temp={ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; } That will try to enumerata parport[0-255]. That would be the easy thing to try. In the linux kernel source tree the code for handling the ports would be linux-version/drivers/char/lp.c. This should get you to where you can look for the code you used on w32. from linux-version/Documentation/devices.txt: 6 char Parallel printer devices 0 = /dev/lp0 Parallel printer on parport0 1 = /dev/lp1 Parallel printer on parport1 ... Current Linux kernels no longer have a fixed mapping between parallel ports and I/O addresses. Instead, they are redirected through the parport multiplex layer. 99 char Raw parallel ports 0 = /dev/parport0 First parallel port 1 = /dev/parport1 Second parallel port ... you will want to read linux-version/Documentation/parport.txt and perhaps linux-version/Documentation/parport-lowlevel.txt I've not tried reading from the parport. All changes posted here have been put into the rxtx-2.1 cvs. (the .c files can drop into 2.0 after a couple search and replaces to move gnu.io to javax.comm). Thats not much help but should point you to the info. There is also the possibility of modifying the RawImp.c files to do the io to addresses as you did in w32. These are also in rxtx 2.1 as they are not part of CommAPI. These filesmore or less outline of how it can be done and not fully implemented solutions. This question shows up every few months with people doing odd things (I guess you fit that group :) If you do find more could you post a quick note about what you found to the list and I'll put in the RXTX documentation? From john_db_adams at yahoo.com Tue Sep 16 13:51:04 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 12:51:04 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet Message-ID: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Hi there, I've been running rxtx for a while now as a standalone app on linux through /dev/ttyS0. This same code snippet gives me a NoSuchPortException when inside the applet (mozilla 1.4 java-1.4.2). The applet is not served from a web-server, but loaded as a jar directly through an html call on the same machine. The rxtx libs are also part of that jar. -- portId = CommPortIdentifier.getPortIdentifier("/dev/ttyS0") -- Is there anything special that needs to be done when being used inside an applet ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 14:24:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 21:24:41 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916195104.97678.qmail@web13205.mail.yahoo.com> References: <20030916195104.97678.qmail@web13205.mail.yahoo.com> Message-ID: You will have to work around applet security. Applets cannot access local files by default. It is possible to turn this security option off. I would just search for how to read and write files to the hard disk with applets. There are a few options and I don't think any changes will need to be made to rxtx unless you go the signed applet route. On Tue, 16 Sep 2003, John Adams wrote: > Hi there, > I've been running rxtx for a while now as a standalone > app on linux through /dev/ttyS0. > This same code snippet gives me a NoSuchPortException > when inside the applet (mozilla 1.4 java-1.4.2). The > applet is not served from a web-server, but loaded as > a jar directly through an html call on the same > machine. The rxtx libs are also part of that jar. > > -- > portId = > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > -- > Is there anything special that needs to be done when > being used inside an applet ? > Thanks > john > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Tue Sep 16 14:40:07 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 13:40:07 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Well, oddly enough, the jar is signed (I am doing file io as well). I did forget however, that the RXTXcomm.jar is not in the archive directive to the applet. I put it in and had the same issue, but I did not sign it. I'll try to sign it and see if ti helps. BTW, what are the issues of usinf signed jars with rxtx ? Thanks john --- Trent Jarvi wrote: > > You will have to work around applet security. > Applets cannot access local > files by default. It is possible to turn this > security option off. > > I would just search for how to read and write files > to the hard disk with > applets. There are a few options and I don't think > any changes will need > to be made to rxtx unless you go the signed applet > route. > > On Tue, 16 Sep 2003, John Adams wrote: > > > Hi there, > > I've been running rxtx for a while now as a > standalone > > app on linux through /dev/ttyS0. > > This same code snippet gives me a > NoSuchPortException > > when inside the applet (mozilla 1.4 java-1.4.2). > The > > applet is not served from a web-server, but loaded > as > > a jar directly through an html call on the same > > machine. The rxtx libs are also part of that jar. > > > > -- > > portId = > > CommPortIdentifier.getPortIdentifier("/dev/ttyS0") > > -- > > Is there anything special that needs to be done > when > > being used inside an applet ? > > Thanks > > john > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:12:20 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:12:20 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916204007.53127.qmail@web13206.mail.yahoo.com> References: <20030916204007.53127.qmail@web13206.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well, oddly enough, the jar is signed (I am doing file > io as well). I did forget however, that the > RXTXcomm.jar is not in the archive directive to the > applet. I put it in and had the same issue, but I did > not sign it. > I'll try to sign it and see if ti helps. > BTW, what are the issues of usinf signed jars with > rxtx ? Hi John This is all I have on Applets. If you find more information related to using rxtx with applets please send it to the list and I'll add it. INSTALL from rxtx 2.1 CVS 4. APPLETS More info is needed on signing applets. This is an exchange from the rxtx mail-list. A. Using Applets prashantg10 at yahoo.com asked: Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Son To replied: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. From john_db_adams at yahoo.com Tue Sep 16 15:34:30 2003 From: john_db_adams at yahoo.com (John Adams) Date: Tue, 16 Sep 2003 14:34:30 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Well as a quick test, I ran mozilla as root instead of me, and the code worked as is. So that should give a few ideas (as in, perhaps this may not be in issue under windows). john --- Trent Jarvi wrote: > > > On Tue, 16 Sep 2003, John Adams wrote: > > > Well, oddly enough, the jar is signed (I am doing > file > > io as well). I did forget however, that the > > RXTXcomm.jar is not in the archive directive to > the > > applet. I put it in and had the same issue, but I > did > > not sign it. > > I'll try to sign it and see if ti helps. > > BTW, what are the issues of usinf signed jars with > > rxtx ? > > Hi John > > This is all I have on Applets. If you find more > information related to > using rxtx with applets please send it to the list > and I'll add it. > > INSTALL from rxtx 2.1 CVS > > 4. APPLETS > > More info is needed on signing applets. This is an > exchange from the rxtx > mail-list. > > A. Using Applets > > prashantg10 at yahoo.com asked: > > Hi All ! > > I am trying to use applet on thin terminal > which has > Linux base Kernel.For testing I am using > Linux > machine.I have install all the required > components. > e.g. JDK, RXTX. Everthing is fine. BlackBox > runs ,even > my application runs. When It comes to > applet, > everything is halts. It does not even show > the listing > of ports. Is it because applet can't run > under root > account or what might be the reasons. Can > anybody tell > me solution. > > Son To replied: > > Java applets run withing the sandbox of the > security manager. > Applets must be signed to access the com > port, but for development > purposes you can put > > > user_pref("signed.applets.codebase_principal_support", > true); > > in your prefs.js located in > ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. > I used XUL and CSS for > the GUI development and used mozilla > Javascript SOAP library to > communicate with apache Axis webservice > backend which uses RXTX to > access the com port. > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Tue Sep 16 15:41:11 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 16 Sep 2003 22:41:11 +0100 (BST) Subject: [Rxtx] rxtx inside an applet In-Reply-To: <20030916213430.91604.qmail@web13208.mail.yahoo.com> References: <20030916213430.91604.qmail@web13208.mail.yahoo.com> Message-ID: On Tue, 16 Sep 2003, John Adams wrote: > Well as a quick test, I ran mozilla as root instead of > me, and the code worked as is. So that should give a > few ideas (as in, perhaps this may not be in issue > under windows). You probably want to read about lockfiles in INSTALL then. RXTX lockfiles need the user to be in group uucp or lock depending on the distro. It is also possible to compile rxtx with lockfiles disabled (but this raises the possibility of two programs reading data at the same time -- very bad if your rxtx app starts reading a critical application's data). > --- Trent Jarvi wrote: > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > Well, oddly enough, the jar is signed (I am doing > > file > > > io as well). I did forget however, that the > > > RXTXcomm.jar is not in the archive directive to > > the > > > applet. I put it in and had the same issue, but I > > did > > > not sign it. > > > I'll try to sign it and see if ti helps. > > > BTW, what are the issues of usinf signed jars with > > > rxtx ? > > > > Hi John > > > > This is all I have on Applets. If you find more > > information related to > > using rxtx with applets please send it to the list > > and I'll add it. > > > > INSTALL from rxtx 2.1 CVS > > > > 4. APPLETS > > > > More info is needed on signing applets. This is an > > exchange from the rxtx > > mail-list. > > > > A. Using Applets > > > > prashantg10 at yahoo.com asked: > > > > Hi All ! > > > > I am trying to use applet on thin terminal > > which has > > Linux base Kernel.For testing I am using > > Linux > > machine.I have install all the required > > components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox > > runs ,even > > my application runs. When It comes to > > applet, > > everything is halts. It does not even show > > the listing > > of ports. Is it because applet can't run > > under root > > account or what might be the reasons. Can > > anybody tell > > me solution. > > > > Son To replied: > > > > Java applets run withing the sandbox of the > > security manager. > > Applets must be signed to access the com > > port, but for development > > purposes you can put > > > > > > > user_pref("signed.applets.codebase_principal_support", > > true); > > > > in your prefs.js located in > > ~/.mozilla/default/XYYrandomDirName > > > > I didn't use Java applet for my application. > > I used XUL and CSS for > > the GUI development and used mozilla > > Javascript SOAP library to > > communicate with apache Axis webservice > > backend which uses RXTX to > > access the com port. > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From john_db_adams at yahoo.com Wed Sep 17 07:42:53 2003 From: john_db_adams at yahoo.com (John Adams) Date: Wed, 17 Sep 2003 06:42:53 -0700 (PDT) Subject: [Rxtx] rxtx inside an applet In-Reply-To: Message-ID: <20030917134253.65541.qmail@web13201.mail.yahoo.com> Thanks for the info ... For the record, I followed the instructions on adding myself to the required groups. I'm using redhad9. I added myself to both lock and uucp. Also, the INSTALL should probably note that both /etc/group and /etc/group- need to be updated on redhat. Alternatively, doing it through the gui is probably better. Then I had to re-login (re-sourcing bash didn't cut it). john --- Trent Jarvi wrote: > On Tue, 16 Sep 2003, John Adams wrote: > > > Well as a quick test, I ran mozilla as root > instead of > > me, and the code worked as is. So that should give > a > > few ideas (as in, perhaps this may not be in issue > > under windows). > > You probably want to read about lockfiles in INSTALL > then. RXTX lockfiles > need the user to be in group uucp or lock depending > on the distro. It > is also possible to compile rxtx with lockfiles > disabled (but this raises > the possibility of two programs reading data at the > same time -- very bad > if your rxtx app starts reading a critical > application's data). > > > > > --- Trent Jarvi wrote: > > > > > > > > > On Tue, 16 Sep 2003, John Adams wrote: > > > > > > > Well, oddly enough, the jar is signed (I am > doing > > > file > > > > io as well). I did forget however, that the > > > > RXTXcomm.jar is not in the archive directive > to > > > the > > > > applet. I put it in and had the same issue, > but I > > > did > > > > not sign it. > > > > I'll try to sign it and see if ti helps. > > > > BTW, what are the issues of usinf signed jars > with > > > > rxtx ? > > > > > > Hi John > > > > > > This is all I have on Applets. If you find more > > > information related to > > > using rxtx with applets please send it to the > list > > > and I'll add it. > > > > > > INSTALL from rxtx 2.1 CVS > > > > > > 4. APPLETS > > > > > > More info is needed on signing applets. This is > an > > > exchange from the rxtx > > > mail-list. > > > > > > A. Using Applets > > > > > > prashantg10 at yahoo.com asked: > > > > > > Hi All ! > > > > > > I am trying to use applet on thin > terminal > > > which has > > > Linux base Kernel.For testing I am using > > > Linux > > > machine.I have install all the required > > > components. > > > e.g. JDK, RXTX. Everthing is fine. > BlackBox > > > runs ,even > > > my application runs. When It comes to > > > applet, > > > everything is halts. It does not even > show > > > the listing > > > of ports. Is it because applet can't run > > > under root > > > account or what might be the reasons. > Can > > > anybody tell > > > me solution. > > > > > > Son To replied: > > > > > > Java applets run withing the sandbox of > the > > > security manager. > > > Applets must be signed to access the com > > > port, but for development > > > purposes you can put > > > > > > > > > > > > user_pref("signed.applets.codebase_principal_support", > > > true); > > > > > > in your prefs.js located in > > > ~/.mozilla/default/XYYrandomDirName > > > > > > I didn't use Java applet for my > application. > > > I used XUL and CSS for > > > the GUI development and used mozilla > > > Javascript SOAP library to > > > communicate with apache Axis webservice > > > backend which uses RXTX to > > > access the com port. > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at linuxgrrls.org > > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:12:53 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:12:53 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021253.76345.qmail@web80601.mail.yahoo.com> Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux _ but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From reggiehg_t at yahoo.com Mon Sep 1 20:14:18 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Mon, 1 Sep 2003 19:14:18 -0700 (PDT) Subject: [Rxtx] RxTx 2.0-5 and Gentoo Linux (Oops, forgot the Linux kernel version) In-Reply-To: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Message-ID: <20030902021418.58597.qmail@web80602.mail.yahoo.com> (Oops, forgot the Linux kernel version) Hi, We tried intalling RxTx 2.0-5 on Gentoo Linux 2.4.20-gentoo-r6 but BlackBox's gui is unresponsive? The same thing happens w/ 1.4-13, w/ the addition of the noverify error, which disappeared when we set noverify. TIA, Reggie Guevara __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From p.cain at phasefale.com.au Tue Sep 2 01:21:09 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:21:09 +1000 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: <200309021721.09922.p.cain@phasefale.com.au> On Fri, 29 Aug 2003 12:22, Trent Jarvi wrote: > On Fri, 29 Aug 2003, Trent Jarvi wrote: > > > And that came back with the error "cannot execute cpp0". I tried > > > changing all the calls to "gcc" under that target to > > > "i586-mingw32msvc-gcc" and I get that some headers are missing (the > > > exact same errors I got when I tried to use mingw32 on WinXP to compile > > > the dll). Missing pwd.h, grp.h, sys/signal.h. > > > > > > Any ideas? > > > > > > Scott > > I'm not familiar with debians packages but often the packages get > installed in /usr/local/bin. That directory should be at the front of > your path so gcc can know it has the cross-compiler. > > If nothing else I can give you a ssh account on my box later next week. > _______________________________________________ I hit this problem today, I also had the same problems trying to compile on XP. From my experience the problems you are seeing (cross compiling in linux) have to do with the version of the mingw cross compiler. I had problems using the the new version of the cross compiler at http://www.devolution.com/~slouken/SDL/ The solution I found was to get the cross compiler linked int he INSTALL text. To quote that file "Wayne Roberts contributed the version used by the maintainer. (Wayne is largely responsible for bringing rxtx back to win32.) http://www.linuxgrrls.org/~taj/crossmingw32-2.95-1.i386.rpm" There are utils to change rpms to tar balls and to .deb so it shouldn't be to hard to get the binaries onto your system, the rpm installs to /usr/local/cross-tools/ To complete the compilation I pretty much followed the instructions in the INSTALL text which got me a .dll -- Peter Cain p.cain at phasefale.com.au Phasefale Pty Ltd. http://www.phasefale.com.au From p.cain at phasefale.com.au Tue Sep 2 01:56:26 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Tue, 2 Sep 2003 17:56:26 +1000 Subject: [Rxtx] Flow Control on WinXP Message-ID: <200309021756.26633.p.cain@phasefale.com.au> Hi, I've just been moving an app that has been running fine on Linux over to run on WinXP and I've found one major sticking point. Both the Sun and IBM versions of JavaComm don't like serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) If this is set any attempt to write to the port blocks indefinitely despite the fact that the CTS == true. My question is, does RXTX suffer the same problem when run on Windows XP ? I'm currently attempting to build RXTX to run on WindowsXP to find out for myself but I am having some runtime problems, so I thought I'd ask the question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From p.cain at phasefale.com.au Tue Sep 2 22:02:11 2003 From: p.cain at phasefale.com.au (Peter Cain) Date: Wed, 3 Sep 2003 14:02:11 +1000 Subject: [Rxtx] Flow Control on WinXP In-Reply-To: <200309021756.26633.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> Message-ID: <200309031402.11992.p.cain@phasefale.com.au> Just answering my own question. I tested RXTX-2.0-5 and found that it works correctly on XP where the Sun and IBM offerings don't. I also came across some pre compiled binaries of version 2.0-5 for w32. They can be found here http://www.jcontrol.org/html/en/download.html (scroll to the bottom of the page) On Tue, 2 Sep 2003 17:56, Peter Cain wrote: > Hi, > > I've just been moving an app that has been running fine on Linux over to > run on WinXP and I've found one major sticking point. Both the Sun and IBM > versions of JavaComm don't like > serialPrt.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_OUT) > If this is set any attempt to write to the port blocks indefinitely despite > the fact that the CTS == true. > > My question is, does RXTX suffer the same problem when run on Windows XP ? > > I'm currently attempting to build RXTX to run on WindowsXP to find out for > myself but I am having some runtime problems, so I thought I'd ask the > question and possibly save us all some time :) -- Peter Cain Phasefale Pty Ltd. From ndeverge at vegasystem.fr Wed Sep 3 03:48:02 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:48:02 +0200 Subject: [Rxtx] Newbie parallel port question Message-ID: <200309030946.h839kM6d011703@s1.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From david.garnier at trusted-logic.fr Thu Sep 4 02:05:52 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Thu, 04 Sep 2003 10:05:52 +0200 Subject: [Rxtx] RXTX under Windows Message-ID: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Hello, I'm having problems using RXTX under Windows to communicate with a card reader. Some background: I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) in Java. In both cases, the reader is accessible through a COM port (real or virtual). I want to do some precise measurements of the response time of the card. I figured that the best way would be to instrument the RXTX driver, since it is open source. Also, I really need javax.comm instead of gnu.io, so I took the last release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile has to be modified as well. Finally, I got the RXTXserial.dll and the RXTXcomm.jar. Now here is the problem: when I try to communicate with the reader, I can open the port, but all I'm getting is 0xFF. It works fine under Linux. Under Windows, it works with the official javax.comm, but it's not open source. Best Regards, David Garnier From taj at parcelfarce.linux.theplanet.co.uk Thu Sep 4 12:23:22 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj at parcelfarce.linux.theplanet.co.uk) Date: Thu, 4 Sep 2003 19:23:22 +0100 (BST) Subject: [Rxtx] Re: rxtx - problem with custom baud rates (2.1-7pre16) In-Reply-To: <3F523906.1090907@eos.east.hitc.com> Message-ID: Thanks Peter I'll forward this to the rxtx mail-list also. On Sun, 31 Aug 2003, Peter Smith wrote: > Hi > > I was trying to set up Java with a custom baud rate to get my laptop to > talk to my car's ECU dataport (it uses 1953 baud!), but it kept throwing > exceptions. The code in SerialImp.c looked like it should support it, > but with a bit of trial and error I trace the problem to an > uninitialised data structure in 'set_port_params'. > > When the iospeed configuration fails (because it's a non-standard > speed), it goes on to try a custom divisor setup (SerialImp.c::721); > > #if defined(TIOCGSERIAL) > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > cspeed = B38400; > #endif /* TIOCGSERIAL */ > if( cfsetispeed( &ttyset, cspeed ) < 0 || > cfsetospeed( &ttyset, cspeed ) < 0 ) > { > /* OK, we tried everything */ > report( "nativeSetSerialPortParams: Cannot Set > Speed\n" ); > return( 1 ); > } > #if defined(TIOCSSERIAL) > /* It is assumed Win32 does this for us */ > if ( sstruct.baud_base < 1 || > ioctl( fd, TIOCSSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > #endif /* TIOCSSERIAL */ > > > but the structure 'sstruct' hasn't been initialised and the resulting > custom divisor is invalid. > > By changing the first block starting at line 721 to; > > #if defined(TIOCGSERIAL) > if( ioctl( fd, TIOCGSERIAL, &sstruct ) < 0 ) > { > return( 1 ); > } > sstruct.custom_divisor = ( sstruct.baud_base/cspeed ); > sstruct.flags |= ASYNC_SPD_CUST; > cspeed = B38400; > #endif /* TIOCGSERIAL */ > > it works great (though it took me a while to work out I had to set the > ASYNC_SPD_CUST flag too!). > > The 'nativeSetDivisor' function does this initialisation, but it doesn't > compute the custom divisor or set the ASYNC_SPD_CUST flag before it > tries to set it. I'm not sure whether it should also set the baud rate > to B38400 too - I think this is necessary when configuring a custom baud > rate. I didn't change this function since I wasn't using it. > > I was using version 2.1-7pre16, but I found the same problem with 2.1-6. > > Hope this helps. > > Thanks, > Peter Smith > > > > > > > > -- Trent Jarvi taj at www.linux.org.uk From vinu at ntcb.com Fri Sep 5 09:49:40 2003 From: vinu at ntcb.com (vinu) Date: Fri, 5 Sep 2003 10:49:40 -0500 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Message-ID: <200309051104391.SM00868@there> Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia From ndeverge at vegasystem.fr Wed Sep 3 03:01:37 2003 From: ndeverge at vegasystem.fr (Nicolas DEVERGE) Date: Wed, 3 Sep 2003 11:01:37 +0200 Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309031402.11992.p.cain@phasefale.com.au> References: <200309021756.26633.p.cain@phasefale.com.au> <200309031402.11992.p.cain@phasefale.com.au> Message-ID: <20030903085958.4F25F2207F@s2.relay.oleane.net> Hi, I tried to search in the mailing list archive but the web link seems to be broken. So, I post this message knowing that the question should have been asked a lot... so sorry for that... I'm working under linux (2.4.19) and I try to use the parallel port with the rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I start it, I have the following message : [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP arallelBlackBox -p /dev/parport0 Port /dev/parport0 not found! No parallel ports found! I think that I compiled the linux kernel with the right options, I have the following message in dmesg : parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] parport0: irq 7 detected So, what could be the problem ? Many thanks Nicolas From g.j.vanderheiden at genimen.com Fri Sep 5 09:20:47 2003 From: g.j.vanderheiden at genimen.com (Gert-Jan van der Heiden) Date: Fri, 5 Sep 2003 17:20:47 +0200 Subject: [Rxtx] problem compiling CNI tree Message-ID: <200309051720.49251.g.j.vanderheiden@genimen.com> Hello, I'm trying to compile the CNI library and sample application on Linux. Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But compiling the "Simple" sample application goes wrong. It complains about "undefinded reference to '.L222' " The README in this directory explains that it means I'm missing a library, but I don't know which one that should be. I have the basic libz, libdl, libgcj and libthread. $gcj --version gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, bool)': /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: undefined reference to `.L222' collect2: ld returned 1 exit status make: *** [Simple] Fout 1 From taj at linuxgrrls.org Fri Sep 5 11:55:29 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 18:55:29 +0100 (BST) Subject: [Rxtx] problem compiling CNI tree In-Reply-To: <200309051720.49251.g.j.vanderheiden@genimen.com> References: <200309051720.49251.g.j.vanderheiden@genimen.com> Message-ID: On Fri, 5 Sep 2003, Gert-Jan van der Heiden wrote: > Hello, > > I'm trying to compile the CNI library and sample application on Linux. > Compiling the libs seam so go OK, I see the resulting librxtx-0.0-1.so. But > compiling the "Simple" sample application goes wrong. It complains about > "undefinded reference to '.L222' " The README in this directory explains that > it means I'm missing a library, but I don't know which one that should be. I > have the basic libz, libdl, libgcj and libthread. > > $gcj --version > gcj (GCC) 3.3 20030226 (prerelease) (SuSE Linux) > Copyright (C) 2002 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $make > rm -f Simple.java > gcj -d . -C *.java > for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done > jar -cf RXTX.jar gnu/io/*.class > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c > SerialImp.c: In member function `void > gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, > __java_boolean)': > SerialImp.c:1369: warning: label `fail' defined but not used > g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 > -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c > (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) > g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o > librxtx-0.0-1.so > rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so > ar rs librxtx.a gnu/io/*.o *.o > #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple > ln -s Simple.Java Simple.java > gcj --classpath RXTX.jar -d . -C Simple.java > rm Simple.java > gcj -g -classpath RXTX.jar -d . -c Simple.class > gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple > --main=Simple > gnu/io/RXTXPort.o(.text+0xa1f): In function `gnu::io::RXTXPort::sendEvent(int, > bool)': > /home/gertjan/build/rxtx-2.1-7pre16/CNI/gnu/io/gnu/io/RXTXPort.java:613: > undefined reference to `.L222' > collect2: ld returned 1 exit status > make: *** [Simple] Fout 1 > > The errors I saw while making the commetn in README had real function names. The error above is probably an error lower than what I was seeing. Something is probably wrong with your toolchain. I just checked with the CVS CNI (in the 2.1 tree) and things are still compiling fine here: [root at servertrent CNI]# make rm -f Simple.java gcj -d . -C *.java for i in gnu/io/*.class;do gcjh -d . `echo $i|sed s/.class//g`;done jar -cf RXTX.jar gnu/io/*.class g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c SerialImp.c SerialImp.c: In member function `void gnu::io::RXTXPort::writeArray(JArray*, __java_int, __java_int, __java_boolean)': SerialImp.c:1369: warning: label `fail' defined but not used g++ -Wall -g -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -O2 -D_POSIX_SOURCE -D_BSD_SOURCE -D__need_timespec -I . -c fuserImp.c (cd gnu/io && gcj -g -classpath ../.. -d gnu/io -c *.class ) g++ -g -shared gnu/io/*.o *.o -lpthread -Wl,-soname -Wl,librxtx-0.0-1.so -o librxtx-0.0-1.so rm -f librxtx.so && ln -s librxtx-0.0-1.so librxtx.so ar rs librxtx.a gnu/io/*.o *.o #gcj *.o librxtx.a -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple ln -s Simple.Java Simple.java gcj --classpath RXTX.jar -d . -C Simple.java rm Simple.java gcj -g -classpath RXTX.jar -d . -c Simple.class gcj -g *.o gnu/io/*.o -static -lgcj -lpthread -ldl -lz -o Simple --main=Simple [root at servertrent CNI]# ./Simple Getting PortIdentifiers Devel Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 writing output Got Data Available Printing read() results 123456789 [root at servertrent CNI]# gcc --version gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# gcj --version gcj (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [root at servertrent CNI]# rpm -q gcc gcc-java gcc-3.2-7 gcc-java-3.2-7 From taj at linuxgrrls.org Fri Sep 5 12:26:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:26:15 +0100 (BST) Subject: [Rxtx] Newbie parallel port question In-Reply-To: <200309030946.h839kM6d011703@s1.relay.oleane.net> References: <200309030946.h839kM6d011703@s1.relay.oleane.net> Message-ID: On Wed, 3 Sep 2003, Nicolas DEVERGE wrote: > Hi, > I tried to search in the mailing list archive but the web link seems to be > broken. > So, I post this message knowing that the question should have been asked a > lot... so sorry for that... > I'm working under linux (2.4.19) and I try to use the parallel port with the > rxtx library. I tried the ParallelBlackBox sample for the commapi. But when I > start it, I have the following message : > > [root at nicolas ParallelBlackBox]# java -classpath ParallelBlackBox.jarP > arallelBlackBox -p /dev/parport0 > Port /dev/parport0 not found! > No parallel ports found! > > I think that I compiled the linux kernel with the right options, I have the > following message in dmesg : > parport0: PC-style at 0x378 (0x778) [PCSPP(,...)] > parport0: irq 7 detected > > So, what could be the problem ? > Many thanks > Nicolas Hi Nicolas: in RXTXCommDriver.java you will need to modify the ports enumerated or make a symbolic link to use parport0. The code in question is: String[] temp={ /* add this line */ "parport", "lp" // linux printer port }; CandidatePortPrefixes=temp; otherwise you can make a symbolic link from parport0 to say lp16 and use lp16. There are other tricks described in the README but that should get you going. The Parallel support is not very robust but should do basic tasks. From taj at linuxgrrls.org Fri Sep 5 12:32:07 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:32:07 +0100 (BST) Subject: [Rxtx] RXTX under Windows In-Reply-To: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> References: <5.2.0.9.0.20030904090932.02c2aa70@mail.trusted-logic.fr> Message-ID: On Thu, 4 Sep 2003, David Garnier wrote: > Hello, > > I'm having problems using RXTX under Windows to communicate with a card reader. > > Some background: > I need to talk with card readers (Towitoko Chipdrive Micro USB or serial) > in Java. In both cases, the reader is accessible through a COM port (real > or virtual). I want to do some precise measurements of the response time of > the card. I figured that the best way would be to instrument the RXTX > driver, since it is open source. > > Also, I really need javax.comm instead of gnu.io, so I took the last > release of RXTX (rxtx-2.1-7pre16) and modified a few classes. The makefile > has to be modified as well. Finally, I got the RXTXserial.dll and the > RXTXcomm.jar. > > Now here is the problem: when I try to communicate with the reader, I can > open the port, but all I'm getting is 0xFF. It works fine under Linux. > Under Windows, it works with the official javax.comm, but it's not open source. > Hi David I'm guessing one of the default settings on w32 is not matching the defaults on linux. You may try setting the port explicitly to the required settings. You could also try using the BlackBox application in Sun's commapi to fiddle with settings to see if that helps identify the problem. One thing that comes to mind is that the speed settings do not always map clearly between unix and w32. Also, high speed serial settings have not been well tested. I'm not aware of any problems that should result in your observations but most testing is done on a loopback. From taj at linuxgrrls.org Fri Sep 5 12:40:47 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 5 Sep 2003 19:40:47 +0100 (BST) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. In-Reply-To: <200309051104391.SM00868@there> References: <200309051104391.SM00868@there> Message-ID: Hi vinu: java -noverify used to get around this. You may need to upgrade to a recent rxtx 2.0 with newer JRE's. Private methods in inner classes needed to be made protected to get around this issue. The problem was harmless but the JRE is correct to point out the error. On Fri, 5 Sep 2003, vinu wrote: > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmccarthy at fexco.com Fri Sep 5 10:02:50 2003 From: dmccarthy at fexco.com (Denis McCarthy) Date: Fri, 5 Sep 2003 17:02:50 +0100 Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. Message-ID: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Try appending the -noverify option after java; i.e. run java -noverify HTH Denis -----Original Message----- From: vinu [mailto:vinu at ntcb.com] Sent: 05 September 2003 16:50 To: rxtx at linuxgrrls.org Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. Hi! Everybody. I have installed JavaKit and RXTX. on my Linux box. When I tried to open the serial port from JavaKit it gives folliwong error. java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call at gnu.io.RXTXPort.(RXTXPort.java) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) What could be the reason? I would be thankfull for any help. Vinu Vaghasia _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator. This footnote also confirms that this email message has been checked for the presence of computer viruses. www.Fexco.com ********************************************************************** From son at openbx.net Sat Sep 6 09:48:38 2003 From: son at openbx.net (Son To) Date: Sat, 6 Sep 2003 11:48:38 -0400 (EDT) Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPor t. In-Reply-To: <0BEBF0D84B489643952C31489879165202080AD1@koe2k1.fexco.ie> Message-ID: I had this problem with when following the directions at http://wass.homelinux.net/howtos/Comm_How-To.shtml But when I compiled rxtx-2.0-5 from source instead of getting the binaries linked on the howto, the -noverify switch was no longer needed. On Fri, 5 Sep 2003, Denis McCarthy wrote: > Try appending the -noverify option after java; > i.e. run > java -noverify > HTH > Denis > > > -----Original Message----- > From: vinu [mailto:vinu at ntcb.com] > Sent: 05 September 2003 16:50 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Running JavaKit on Linux gives problem due to RXTXPort. > > > Hi! Everybody. > > I have installed JavaKit and RXTX. on my Linux box. > > When I tried to open the serial port from JavaKit it gives folliwong > error. > > java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: > flush signature: ()V) Illegal use of nonvirtual function call > at gnu.io.RXTXPort.(RXTXPort.java) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634) > > > What could be the reason? > > I would be thankfull for any help. > > > > Vinu Vaghasia > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > your system administrator. > > This footnote also confirms that this email message has been checked > for the presence of computer viruses. > > www.Fexco.com > ********************************************************************** > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Mon Sep 8 06:58:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 8 Sep 2003 13:58:59 +0100 (BST) Subject: [Rxtx] searchable archive link Message-ID: >From taj at linuxgrrls.org Mon Sep 8 13:38:39 2003 Newsgroups: Date: Mon, 8 Sep 2003 13:38:39 +0100 (BST) From: Trent Jarvi To: rxtx at linuxgrrls.org, jasmine at linuxgrrls.org Subject: rxtxx Searchable archives Fcc: sent-mail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII http://marc.theaimsgroup.com/?l=rxtx I knew this was someplace but couldn't find the link when it came up. Configuring mailman to show this on the mail-list page appears to be nontrivial so just bookmark the URL for now. -- taj From sylvie.locastello at thales-is.com Tue Sep 9 00:55:17 2003 From: sylvie.locastello at thales-is.com (Sylvie Locastello) Date: Tue, 09 Sep 2003 08:55:17 +0200 Subject: [Rxtx] searchable archive link References: Message-ID: <3F5D7955.E2BE54DB@thales-is.com> Is it possible not to